package com.spring.demo10.eg3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author vhans
 */
@Component
// 使用自定义的刷新作用域注解
@RefreshScope
public class MailConfig1 {

    @Value("${mail.username}")
    private String username;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "MailConfig1{" +
                "username='" + username + '\'' +
                '}';
    }
}
